package com.bobi.tfca.network.api

import com.bobi.tfca.network.response.AuditResponse
import com.bobi.tfca.network.response.BaseResponse
import okhttp3.RequestBody
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Headers
import retrofit2.http.POST
import retrofit2.http.Path

interface AuditAPI {

    /**
     * 查询所有入会申请
     */
    @Headers("Accept: application/json")
    @GET("/audit/findAllEntryApply")
    fun findAllEntryApply(): Call<BaseResponse<ArrayList<AuditResponse>>>

    /**
     * 查询所有退会申请
     */
    @Headers("Accept: application/json")
    @GET("/audit/findAllExitApply")
    fun findAllExitApply(): Call<BaseResponse<ArrayList<AuditResponse>>>

    /**
     * 通过审核
     */
    @Headers("Accept: application/json")
    @POST("/audit/passAudit/{auditId}")
    fun passAudit(@Path("auditId") auditId: Int): Call<BaseResponse<String>>

    /**
     * 拒绝申请
     */
    @Headers("Accept: application/json")
    @POST("/audit/refuseAudit/{auditId}")
    fun refuseAudit(@Path("auditId") auditId: Int): Call<BaseResponse<String>>

    /**
     * 申请退出协会
     */
    @Headers("Content-Type: text/plain", "Accept: application/json")
    @POST("/audit/applyQuitAss")
    fun applyQuitAss(@Body requestBody: RequestBody): Call<BaseResponse<String>>

}